package com.itheima03.day14;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author 刘全
 * @date 2021/8/8
 */
public class Adomic implements Runnable{
    private AtomicInteger ai = new AtomicInteger(0);

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            int i1 = ai.incrementAndGet();
            System.out.println("执行了"+i1);
        }
    }
}
